package com.web.dao.impl;

import com.web.dao.InsertStudentDAO;
import com.web.entity.Student;
import com.web.util.JDBCUtils;

/**
 * @author lenovo
 * @Description
 * @Date2025-3-1 16:20
 */
public class InsertStudentDAOImpl implements InsertStudentDAO {
    @Override
    public int insertStudent(Student student){
        String sql ="insert into student_s(name,age,cellphone,address,gender)value(?,?,?,?,?)";
        Object[] args = new Object[]{
                student.getName(),
                student.getAge(),
                student.getCellphone(),
                student.getAddress(),
                student.getGender()
        };
        return JDBCUtils.update(sql, args);

    }
}
